<?php

namespace common\models\datas;

use common\components\bases\BaseModel;
use Yii;

/**
 * This is the model class for table "{{%brand}}".
 *
 * @property integer $id
 * @property string $name
 * @property string $logo
 * @property string $url
 * @property string $description
 * @property string $keyword
 * @property integer $sort
 * @property integer $is_show
 * @property integer $created_at
 */
class Regions extends BaseModel
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%regions}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['region_id','p_region_id','region_grade','ordernum'],'integer'],
            [['region_path'], 'string'],
            [['local_name'],'unique'],
            [['local_name','package','p_1','p_2'], 'string', 'max' => 50]
        ];
    }

    /**
     * @inheritdoc
     */
    
    public function attributeLabels()
    {
        return [
            'region_id' => Yii::t('common', '自动编号'),
            'p_region_id' => Yii::t('common', ''),
            'region_grade' => Yii::t('common', '等级'),
            'ordernum' => Yii::t('common', '排序'),
            'region_path' => Yii::t('common', '图标'),
            'local_name' => Yii::t('common', '地区名'),
            'package' => Yii::t('common', ''),
            'p_1' => Yii::t('common', ''),
            'p_2' => Yii::t('common', ''),
            'disabled' => Yii::t('common', '是否启用')
        ];
    }



}
